package com.zhuiyun.pm.client.bidding.service.impl;

import com.zhuiyun.pm.client.bidding.entity.ClientGoodsInfo;
import com.zhuiyun.pm.client.bidding.mapper.ClientGoodsInfoMapper;
import com.zhuiyun.pm.client.bidding.service.ClientGoodsInfoService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class ClientGoodsInfoServiceImpl implements ClientGoodsInfoService {
    @Resource
    ClientGoodsInfoMapper clientGoodsInfoMapper;


    @Override
    public List<ClientGoodsInfo> findAll(Integer sellerId) {
        List<ClientGoodsInfo> list = clientGoodsInfoMapper.listinfo(sellerId);
        List<ClientGoodsInfo> list22 = clientGoodsInfoMapper.listgoods(sellerId);
        for (ClientGoodsInfo clientGoodsInfo : list) {
            for (ClientGoodsInfo goodsInfo : list22) {
                clientGoodsInfo.setChildren(list22);
            }
        }
        return list;
    }


}
